<template>
	<view>
		<view class="center flex-column" style="height: 70vh;">
			<view class="">
				<text class="red size-28">￥</text>
				<text class="red size-50">{{info.order_price}}</text>
			</view>
			<view class="">
				含平台服务费：
				<text class="red">￥{{info.service_fee}}</text>
			</view>
		</view>
		<view class="size-24 plr-36 mt-50">
			注：请确认收到付款后进行操作，否则造成损失平台概不负责
		</view>
		<view class="mlr-36 mt-30">
			<u-button type="primary" @click="toPay">确认结算</u-button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:'',
				info:{}
			};
		},
		onLoad(option) {
			uni.setNavigationBarTitle({
				title:'货到付款'
			})
			this.id = option.id
			this.$http('/addons/ddrive/hyorder/offline', {
				order_id: this.id
			}, "POST").then((data) => {
				this.info = data
			})
		},
		methods:{
			toPay() {
				this.$http('/addons/ddrive/hyorder/confirm', {
					order_id: this.id
				}, "POST").then(() => {
					uni.redirectTo({
						url:'./order-detail?id='+this.id
					})
				})
			},
		}
	}
</script>

<style lang="scss" scoped>

</style>
